package client;

import server.core.IMyRemote;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

/**
 * describe:
 *
 * @author helloworldyu
 * @data 2018/3/26
 */
public class ClientMain {
	public static void main(String[] args) {
		IMyRemote remote= null;
		try {
			remote = (IMyRemote) Naming.lookup("rmi://127.0.0.1:1099/hello");
			String s = remote.sayHello();
			System.out.println(s);
		} catch (NotBoundException e) {
			e.printStackTrace();
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}
}